package io.gitee.tziye.core.lock;

import io.gitee.tziye.RenaiClient;

import java.util.Collection;

public abstract class LockOperator {

    protected final RenaiClient renaiClient;

    public LockOperator(RenaiClient renaiClient) {
        this.renaiClient = renaiClient;
    }

    public abstract boolean lock(String key, String value, int expireSeconds);

    public abstract boolean lock(String key, String value, int expireSeconds, int timeout);

    public abstract boolean unlock(String key, String value);

    public abstract int delete(Collection<String> keys);
}
